<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>timer-button</title>
  <link rel="stylesheet" href="layout.css">
</head>

<body>
  <input type='button' id="add" value="添加定时器按钮"></input>
  <input type='button' id="del" value="删除定时器按钮"></input>
  <br>
  <div id="test"></div>
  <script src="../jquery.min.js"></script>
  <script src="main.js"></script>
  <script>
    $(function () {
      let $btnadd = $('#add'),
        $btndel = $('#del');

      $btnadd.click(() => {
        // $timerBtn.show({
        let btn = new TimerBtn();
        btn.show({
          container: '#test',
          title: '发送验证码',
          onclick:function(){console.log('timer button click!');}
        })
      });

      // $btndel.click(()=>{
      //   $timerBtn.destory();
      // })
    });
  </script>
</body>

</html>